package cn.ekuma.impexp.generator;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.openbravo.data.loader.Datas;

import cn.ekuma.impexp.FieldGenerator;

public class GeneratorUtils {

	
	public final static List<FieldGenerator> getStringFieldGeneratorList(){
		ArrayList<FieldGenerator> retList=new ArrayList<FieldGenerator>();
		retList.add(DateStringGenerator.INSTANCE);
		retList.add(UUIDGenerator.INSTANCE);
		return retList;	
	}
	
	
	public final static List<FieldGenerator> getDateFieldGeneratorList(){
		ArrayList<FieldGenerator> retList=new ArrayList<FieldGenerator>();
		retList.add(DateGenerator.INSTANCE);
		return retList;	
	}
	
	public final static List<FieldGenerator> getIntegerFieldGeneratorList(){
		ArrayList<FieldGenerator> retList=new ArrayList<FieldGenerator>();
		retList.add(NumberGenerator.INSTANCE);
		return retList;	
	}
	
	public final static List<FieldGenerator> getFieldGeneratorListByData(Datas inData){
		if(inData.getClassValue()==Integer.class){
			return getIntegerFieldGeneratorList();
		}else if(inData.getClassValue()==String.class){
			return getStringFieldGeneratorList();
		}else if(inData.getClassValue()==Date.class){
			return getDateFieldGeneratorList();
		}else if(inData.getClassValue()==Long.class){
			
		}
		
		return new ArrayList();	
	}
	
}
